﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using PMServiceDesk.BusinessLogic;
using PMServiceDesk.DataType;
using PMServiceDesk.Utils.Interfaz;

namespace PMServiceDesk.Web.Forms.PaginaPublica
{
    public partial class MostrarDocumentoDigital : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;

            string id = Request["ARCHIVO"];

            if (id == null)  return;

            DocumentoDigitalType d = new DocumentoDigitalLogic().CargarPorId(id);

            if (d == null) return;

            InterfazUtils.MostrarDocumentoDigital(this.Response, d.FileName, d.Content, d.ContentType);
        }
    }
}